Can DXL return exit codes to a C# program after completion

I have written a C# program to run DOORS in batch mode passing it a DXL script, traverse the database for a module and return the module. I was wondering if it were possible in the instance that a module is not found, because the user spelled the module name wrong, can DXL return say a 1 for module not found, to the C# program so there would be a way to notify the user?
Thank you in advance.
szczy7 - Fri Jan 14 10:41:58 EST 2011

Re: Can DXL return exit codes to a C# program after completion
llandale - Fri Jan 14 13:05:50 EST 2011

Not too experienced at API, but I wonder what you mean when you say "return the module". When the batch program ends, that DOORS session ends, and I wonder what information you want passed back to your program. Perhaps you are asking "Please find module XYZ" and the return is a string of the project/folder name housing that module if found; well if so return a null string when not found.

  • Louie

Re: Can DXL return exit codes to a C# program after completion
szczy7 - Fri Jan 14 13:31:00 EST 2011

llandale - Fri Jan 14 13:05:50 EST 2011
Not too experienced at API, but I wonder what you mean when you say "return the module". When the batch program ends, that DOORS session ends, and I wonder what information you want passed back to your program. Perhaps you are asking "Please find module XYZ" and the return is a string of the project/folder name housing that module if found; well if so return a null string when not found.

  • Louie

I meant to say I export the module as a saved .rtf to the harddrive. However if a module or the specified server is not found I would like to some how return an integer/string either from the doors.exe or from the DXL script itself after completion to be passed back to the C# program so it can handle those senarios. Right now the script just prints to the command prompt ie "Module not found" or "Server can not be found". This is unacceptable for me because it needs to be automated without user intervention.
Thank you in advance.

Re: Can DXL return exit codes to a C# program after completion
Mathias Mamsch - Sat Jan 15 13:03:23 EST 2011

szczy7 - Fri Jan 14 13:31:00 EST 2011
I meant to say I export the module as a saved .rtf to the harddrive. However if a module or the specified server is not found I would like to some how return an integer/string either from the doors.exe or from the DXL script itself after completion to be passed back to the C# program so it can handle those senarios. Right now the script just prints to the command prompt ie "Module not found" or "Server can not be found". This is unacceptable for me because it needs to be automated without user intervention.
Thank you in advance.

Write the result to a file and pass the filename from the calling c# program to the script. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Can DXL return exit codes to a C# program after completion
szczy7 - Tue Jan 18 12:42:19 EST 2011

Mathias Mamsch - Sat Jan 15 13:03:23 EST 2011
Write the result to a file and pass the filename from the calling c# program to the script. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Works for me. Mathias, thank you again. I should have thought of this myself.